package com.tianjin.weight.service.base;


import com.tianjin.weight.behaviour.interfaces.RolePermissionBehavior;
import com.tianjin.weight.common.CurdExtraAddBatch;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public abstract class RolePermissionService<T> implements CurdExtraAddBatch, RolePermissionBehavior {
    RolePermissionBehavior rolePermissionBehavior;

    @Autowired
    public void setRolePermissionBehavior(RolePermissionBehavior rolePermissionBehavior) {
        this.rolePermissionBehavior = rolePermissionBehavior;
    }

    public  void addBatch(List<Long> permissionIds, Long roleId) throws Exception{
        this.rolePermissionBehavior.addBatch(permissionIds,roleId);
    }
}
